<?php 

 if (!isset($_SESSION['login']) or !isset($_SESSION['senha'])) {
 	header('location:../index.html');
 }
 	
 	$sqlcategiria = "SELECT * FROM categoria_ferramenta";
 	$resultcategoria = mysql_query($sqlcategiria) or die(mysql_error());
 ?>
 <html>
 <head>
 	<title></title>
 	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 </head>
 <body>
 	   <form action="index.php?page=requisicao/adicionarferramenta.php" method="post">
   	  <fieldset id="formulario" class="field">
      <legend>Pesquisar Ferramenta</legend>
      <p>
    	  <label for="codigo">
    	    <input type="radio" name="RadioGroup1" value="1" id="RadioGroup1_0" />
    	    Código:
    	  </label>
          <input name="codigo" id="codigo" type="text" />
    	  <br />
    	  <label for="nome">
    	    <input type="radio" name="RadioGroup1" value="2" id="RadioGroup1_1" />
    	    Nome:</label>
            <input name="nome" id="nome" type="text" />
    	  <br />
   	    <label for="fabricante">
    	    <input type="radio" name="RadioGroup1" value="3" id="RadioGroup1_2" />
    	    Fabricante:
   	    </label>
        <input name="fabricante" id="fabricante" type="text" />
   	    <br />
    	  <label for="categoria">
    	    <input type="radio" name="RadioGroup1" value="4" id="RadioGroup1_3" />
    	    Categoria:</label>
           	<select name="categoria" id="categoria">
              <?php while ($arraycateg = mysql_fetch_assoc($resultcategoria)): ?>
                <option value="<?php echo $arraycateg['idcategoria']; ?>">
                  <?php echo $arraycateg['nome_categoria']; ?>
                </option>
              <?php endwhile; ?>
            </select>
    	  <br />
  	  </p>
       <input id="botaolivre" type="submit" value="Pesquisar"/>
    </form>
    </fieldset>
    
 </body>
 </html>